class Compra(object):
    
    def __init__(self, objectCliente, objectVendedor, objectModoPag):
        self.__objectCliente = objectCliente
        self.__objectVendedor = objectVendedor
        self.__objectModoPag = objectModoPag
        self.__listaAutomovel = []
        self.__valores = []

    def addAutomovel(self, objectAutomovel):
        self.__listaAutomovel.append(objectAutomovel)
        
    def getValorTotal(self):
        for self.__automovel in self.__listaAutomovel:
            self.__valores.append(self.__automovel.getPrecoVenda())      
            
        return sum(self.__valores)

